{block name="content"}
<div class="panel panel-default panel-intro">
    {:build_heading()}
    <div class="panel-body">
        <!-- 搜索表单 -->
        <form id="search-form" class="form-horizontal" role="form" data-toggle="validator">
            <div class="row">
                <div class="col-xs-12 col-sm-3">
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" class="form-control" name="keyword" placeholder="请输入姓名/手机号/学校/社区" value="{:input('get.keyword')}">
                            <span class="input-group-btn">
                                <button type="button" id="search-btn" class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                            </span>
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-2">
                    <div class="form-group">
                        <select name="status" class="form-control selectpicker" data-rule="required">
                            <option value="">全部状态</option>
                            <option value="0" {if input('get.status') == '0'}selected{/if}>待审核</option>
                            <option value="1" {if input('get.status') == '1'}selected{/if}>正常</option>
                            <option value="2" {if input('get.status') == '2'}selected{/if}>已拒绝</option>
                        </select>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-2">
                    <div class="form-group">
                        <button type="button" id="reset-btn" class="btn btn-default"><i class="fa fa-refresh"></i> 重置</button>
                    </div>
                </div>
            </div>
        </form>
        
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">教师列表</h3>
                <div class="panel-options">
                    <div class="btn-group">
                        <a href="javascript:;" class="btn btn-default btn-sm btn-import"><i class="fa fa-upload"></i> 导入</a>
                        <a href="javascript:;" class="btn btn-default btn-sm btn-export"><i class="fa fa-download"></i> 导出</a>
                    </div>
                </div>
            </div>
            <div class="panel-body">
                <table id="table" class="table table-striped table-bordered table-hover"
                       data-operate-edit="{:$auth->check('community/teacherpool/edit')}"
                       data-operate-del="{:$auth->check('community/teacherpool/del')}"
                       data-show-columns="true"
                       data-show-export="true"
                       data-show-refresh="true"
                       data-search="false"
                       data-side-pagination="server"
                       data-pagination="true"
                       data-page-list="[10, 25, 50, 100, 200, 500]"
                       data-query-params="function(params) { return $.extend({}, params, $('form#search-form').serializeObject()); }"
                       data-response-handler="responseHandler"
                       width="100%">
                    <thead>
                    <tr>
                        <th data-field="id" data-sortable="true" data-width="5%">ID</th>
                        <th data-field="name" data-sortable="true" data-formatter="Table.api.formatter.search" data-width="10%">姓名</th>
                        <th data-field="phone" data-sortable="true" data-formatter="Table.api.formatter.search" data-width="12%">手机号</th>
                        <th data-field="school.name" data-sortable="true" data-formatter="Table.api.formatter.search" data-width="15%">所属学校</th>
                        <th data-field="community.name" data-sortable="true" data-formatter="Table.api.formatter.search" data-width="15%">所属社区</th>
                        <th data-field="teaching_years" data-sortable="true" data-width="8%">教龄</th>
                        <th data-field="status" data-sortable="true" data-formatter="Table.api.formatter.status" data-width="10%">状态</th>
                        <th data-field="operate" data-formatter="Table.api.formatter.operate" data-events="operateEvents" data-width="15%">操作</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>
{/block}